package com.dgut.hisystem.mapper;

import com.dgut.hisystem.entity.Patient;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface PatientMapper {
    @Select({"Select * from patient_info where br_card = #{id}"})
    Patient selectID(long id);
    @Update({"Update patient_info set br_balance=#{money} where br_card = #{patient.br_card}"})
    void updateBalance(double money,Patient patient);

    void insert(Patient patient);

    @Delete({"DELETE FROM patient_info WHERE yh_id = #{yh_id}"})
    void deleteByYhID(long yh_id);
}
